package br.uece.laconi.tac.fuzzy.functions;

public class SimpleIntervalFix extends GenericFunction {

	float min;
	float max;
	
	public SimpleIntervalFix(float min, float max) {
		this.min = min;
		this.max = max;
	}
	@Override
	public Float calculate(float[] var) {
		if(var[0] < min)
			return min;
		if(var[0] > max)
			return max;
		else
			return var[0];
	}

}
